package cn.aitrox.ry.service.anno.enumtype.anno;

public enum YayEnum {

    YING(1, "阴性"),
    YANG(2, "阳性");

    private Integer value;

    private String desc;

    YayEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static YayEnum getEnumByValue(Integer value) {
        if (null == value) {
            return null;
        }
        for (YayEnum yayEnum : YayEnum.values()) {
            if (yayEnum.getValue().equals(value)) {
                return yayEnum;
            }
        }
        return null;
    }
}
